import java.net.*;
import java.io.*;
import java.util.*;

public class ChatServer {
	
	public void start(int port){
		ServerSocket		server;
		Socket				socket;
		ChatServerThread	thread;
		
		try{
			server = new ServerSocket(port);
			System.err.println("채팅 서버 실행 시작 : " + port);
			while(true){
				try{
					socket = server.accept();
					
					thread = new ChatServerThread(socket);
					thread.start();
				}catch(IOException e){}
			}
		}catch(IOException e){
			System.err.println(e);
		}
	}

	public static void main(String[] args){
		ChatServer server = new ChatServer();
		server.start(80);
	}
}

